package com.tigerhhzz.controller;

import com.tigerhhzz.domain.ResponseResult;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tigerhhzz
 * @date 2022/5/27 14:30
 */
@RestController
public class HelloController {

    @RequestMapping("/hello")
    //@PreAuthorize("hasAuthority('system:deptment:list')")
    @PreAuthorize("@ex.hasAuthority('system:deptment:list')")
    public String hello(){
        return "hello";
    }


    @RequestMapping("/testCors")
    public ResponseResult testCors(){
        return new ResponseResult(200,"testCors");
    }
}
